package com.qf.day15.customex;

import java.util.HashMap;

public class LoginDemo {
    public static void main(String[] args) {
        LoginService loginService = new LoginServiceImpl();

        try {
            HashMap<String, Object> admin = loginService.login("admin", "123456");
            System.out.println("用户登录成了");
            System.out.println(admin);
        } catch (UserException e) {
            System.out.println("登录出现了异常："+e);
            System.out.println("异常的编号为："+e.getExCode());
            System.out.println("异常的含义为："+e.getExDesc());
        }

    }
}
